package com.cssnj.portal.utils;

import com.cssnj.portal.domain.common.GeneralConstants;
import org.springframework.data.redis.core.RedisTemplate;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;


public class RedisUtil {


    public static void setUserTreelist(RedisTemplate redisTemplate, List<Map<String, Object>> treelist, String swrysfDm) {
        redisTemplate.opsForValue().set(
                GeneralConstants.HOME_SHOW_FUNC_PREFIX + ":" + swrysfDm,
                treelist
        );
    }

    public static List<Map<String, Object>> getUserTreelist(RedisTemplate redisTemplate, String swrysfDm) {
        return (ArrayList<Map<String, Object>>) redisTemplate.opsForValue().get(GeneralConstants.HOME_SHOW_FUNC_PREFIX + ":" + swrysfDm);
    }

}
